import subprocess
import json

exe = ['python','outputs.py']
# exe = ['C:\Windows\System32\where.exe', 'python']
# exe = ['C:\Windows\System32\where.exe', 'python']
proc = subprocess.Popen(exe, stdout=subprocess.PIPE)
# rtn = subprocess.run(exe, stdout=subprocess.PIPE)
# msg = rtn.stdout.decode('utf-8')
# msg = rtn.stdout.decode('utf-8')
# rtn_str = json.dumps({'result':msg})
print('123')
while True:
    output = proc.stdout.readline()
    if output == '' and proc.poll() is not None:
        break
    if output:
        print(output.strip())
rc = proc.poll()
print(rc)
